<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /*  transition-property(基本上不用,直接all)
        ：定义哪个属性需要过渡，只有在该属性中定义的属性（比如宽、高、颜色等）才会以有过度效果
        持续时间
        transition-duration 过度效果总共需要的时间
        延迟时间
        transition-delay 延迟多久触发(基本没用过)
        过渡类型
        transition-timing-function 
      */
      .container {
        width: 800px;
        height: 800px;
        padding: 20px;
        border: 1px solid black;
      }
      .box {
        width: 100px;
        height: 100px;
        transition: all 2s;
      }
      .container:hover .box {
        width: 100%;
      }
      .box1 {
        background-color: #1abc9c;
        /* ease 默认 */
        transition-timing-function: ease;
      }
      .box2 {
        background-color: #34495e;
        /* 线性过度 */
        transition-timing-function: linear;
      }
      .box3 {
        background-color: #e74c3c;
        transition-timing-function: ease-in;
      }
      .box4 {
        background-color: #8e44ad;
        transition-timing-function: ease-out;
      }
      .box5 {
        background-color: #e84393;
        transition-timing-function: ease-in-out;
      }
      .box6 {
        background-color: #ff0088;
        transition-timing-function: cubic-bezier(0.24, 1.21, 1, 1.42);
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="box box1">ease平滑过度</div>
      <div class="box box2">linear线性过度</div>
      <div class="box box3">ease-in慢-快</div>
      <div class="box box4">ease-out快-慢</div>
      <div class="box box5">ease-in-out慢-快-慢</div>
      <div class="box box6">无敌的贝塞尔曲线</div>
    </div>
  </body>
</html>
